package com.google.code.greenplate;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class HomeScreen extends Activity {
    /** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home_screen);
        
        //Resources res = this.getResources();
        //Drawable gpLogo = res.getDrawable(R.drawable.logo);
        
        Button getRideButton = (Button)findViewById (R.id.getARide);
        getRideButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                // launch the second activity from button  click.
                Intent intent = new Intent();
                intent.setClass(HomeScreen.this, GetARide.class);
                startActivity(intent);
            }
        }); 
        
        Button giveRideButton = (Button)findViewById (R.id.giveARide);
        giveRideButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                // launch the second activity from button  click.
                Intent intent = new Intent();
                intent.setClass(HomeScreen.this, GiveARide.class);
                startActivity(intent);
            }
        }); 
        
        Button liveRideButton = (Button)findViewById (R.id.liveRides);
        liveRideButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                // launch the second activity from button  click.
                Intent intent = new Intent();
                intent.setClass(HomeScreen.this, LiveRides.class);
                startActivity(intent);
            }
        }); 
        
        Button mycommButton = (Button)findViewById (R.id.myCommunity);
        mycommButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                // launch the second activity from button  click.
                Intent intent = new Intent();
                intent.setClass(HomeScreen.this, BuildCommunity.class);
                startActivity(intent);
            }
        });     
    }
}